package com.chuangjiangx.member.basic.ddd.application.command;


import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;

/**
 * 阿里大鱼短信发送
 * http://open.taobao.com/doc2/apiDetail.htm?apiId=25450
 * Created by junn on 16-4-12.
 */
public class MobileMsgCommand {

    private Integer type;//发送类型 0:发送代理商用户名短信模板 1:发送商户用户名短信模板 2....
    private String rec_num;//手机号 多个,号分割
    private String[] message;//容联发送消息数组


    private String timestamp;//get方法赋值
    private String sms_param;//参数模板 传入json

    public MobileMsgCommand() {
        super();
    }

    public MobileMsgCommand(Integer type, String sms_param, String rec_num) {
        this.type = type;
        this.sms_param = sms_param;
        this.rec_num = rec_num;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getTimestamp() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return sdf.format(new Date());
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }

    public String getSms_param() {
        return sms_param;
    }

    public void setSms_param(String sms_param) {
        this.sms_param = sms_param;
    }

    public String getRec_num() {
        return rec_num;
    }

    public void setRec_num(String rec_num) {
        this.rec_num = rec_num;
    }

    public String[] getMessage() {
        return message;
    }

    public void setMessage(String[] message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return "MobileMsgCommand{" +
                "type=" + type +
                ", rec_num='" + rec_num + '\'' +
                ", message=" + Arrays.toString(message) +
                ", timestamp='" + timestamp + '\'' +
                ", sms_param='" + sms_param + '\'' +
                '}';
    }
}
